package com.fulu.game.bi.entity.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 查询类型枚举
 */
@Getter
@AllArgsConstructor
public enum QueryTypeStatusEnum {
    DAY(1,"日"),
    WEEK(2,"周"),
    MONTH(3,"月"),
    ;

    private Integer type;
    private String msg;

    public static QueryTypeStatusEnum getEnum(Integer type) {
        for(QueryTypeStatusEnum e :  QueryTypeStatusEnum.values()){
            if(Objects.equals(e.getType(),type)){
                return e;
            }
        }
        return null;
    }
}
